/* eslint-disable jsdoc/ts-no-empty-object-type */
void (async () => {
  console.log("mod-then-tla-iiafe::iiafe::before-await");
})();
console.log("mod-then-tla-iiafe::before-await");

export const foz = await Promise.resolve().then(() => "foz");

console.log("mod-then-tla-iiafe::after-await");
void (async () => {
  console.log("mod-then-tla-iiafe::iiafe::after-await");
})();

/**
 * @method
 * @template {{} | undefined} T
 * @param {(value?: T | PromiseLike<T>) => void} resolve
 * @returns {void}
 */
// eslint-disable-next-line unicorn/no-thenable
export function then(resolve) {
  console.log("mod-then-tla-iiafe::then");
  resolve(
    new Promise((resolve) => {
      console.log("mod-then-tla-iiafe::then::resolve");
      resolve(/** @type {T} */ (void 0));
    }),
  );
}
